home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2698 < prev    next >
Encoding:
Text File  |  1996-08-06  |  2.1 KB  |  45 lines

  1. Path: holly.ACNS.ColoState.EDU!not-for-mail
  2. From: corbyh@holly.ACNS.ColoState.EDU (Corby S. Hudnall)
  3. Newsgroups: comp.infosystems.www.authoring.cgi,comp.lang.c++
  4. Subject: Form Processing with C++ (hexidecimal prob)
  5. Date: 18 Jan 1996 18:40:24 -0700
  6. Organization: Colorado State University, Fort Collins, CO  80523
  7. Message-ID: <4dmsq8$3gse@holly.ACNS.ColoState.EDU>
  8. NNTP-Posting-Host: holly.acns.colostate.edu
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11. Hello World
  12.  
  13.   I am developing a class to process FORM input from html documents.  My 
  14. question is this, when the form is submitted, it is escaped with 
  15. hexadecimal characters.  I have a list of the escape codes so do I code 
  16. the class to look for these particular hexadecimal codes, OR is there 
  17. some way to directly translate the escaped hexedecimal codes back to 
  18. their ASCII values?  I would prefer the latter since that would handle 
  19. unknown cases.  I'm also not sure that all browsers sumbit the escaped 
  20. form the same way.  That could represent huge problems down the road.
  21.    I'm pretty sure that I should just be able to add 'a' or something 
  22. like that to the escaped characters to find their true value but I admit 
  23. that I don't know how to go about that.  I've tried looking in some other 
  24. code that processes forms but I haven't had much luck translating what 
  25. was going on.  All I _can_ tell is that those code segments are adding 
  26. something to get the true value and not searching a table of known codes.
  27.    What function does C++ or C support, like hex() or something, that would 
  28. return the ASCII equivalent for an escape code.  All help and suggestion is 
  29. greatly appreciated.  If there are any good books or tutorials out there 
  30. regarding C/C++ and CGI programming, I'd like to know about them as well.
  31.  
  32. Thanks in Advance,
  33.  
  34. // ------------ BEGIN SIGNATURE ---------------
  35. #include <iostream.h>
  36. void main()
  37. {
  38.   cout<<"\aName:\tCorby S. Hudnall\n";
  39.   cout<<"School:\tColorado State University\n";
  40.   cout<<"EMail\tcorbyh@holly.colostate.edu\n";
  41.   cout<<"URL\thttp://holly.colostate.edu/~corbyh/\n";
  42. }
  43. // ------------- END SIGNATURE ----------------
  44.  
  45.